
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<%=basePath%>crm_demo/html/css/style.css" rel="stylesheet" type="text/css">
<script src="<%=basePath%>crm_demo/html/script/common.js"></script>
</head>
<body>

<div class="page_title">客户开发计划</div>
<div class="button_bar">
	<button class="common_button" onclick="help('');">帮助</button>
	<button class="common_button" onclick="selectDes('select');">查询</button>
	</div>
	<form action="intiAction.action" id="select" method="post">
<table class="query_form_table">
	<tr>
		<th>客户名称</th>
		<td><input  name="cond.cusName" size="10" maxlength="20" value=""/></td>
		<th>概要</th>
		<td><input  name="cond.outLine" size="10" maxlength="20" value=""/></td>
		<th>联系人</th>
		<td>
			<input  name="cond.connPeop" size="10" maxlength="20" value=""/>
		</td>
	</tr>
	</table>
</form>
<br />
<table class="data_list_table">
	<tr>
		<th>编号</th>
		<th>客户名称</th>
		<th>概要</th>
		<th>联系人</th>
		<th>联系人电话</th>
		<th>创建时间</th>
		<th>状态</th>
		<th>操作</th>
	</tr>
	<s:iterator value="#session.desList" status="index" var="des" >
	<tr>
		<td class="list_data_number"><s:property value="despatchId"/></td>
		<td class="list_data_text"><s:property value="market.cusName"/></td>
		<td class="list_data_ltext"><s:property value="market.outLine"/></td>
		<td class="list_data_text"><s:property value="market.connPeop"/></td>
		<td class="list_data_text"><s:property value="market.connTel"/></td>
		<td class="list_data_text"><s:property value="market.createDate "/></td>
		<s:if test="market.statue.dicId ==28">
		<td class="list_data_text">开发中</td>
		<td class="list_data_op">
			<img onclick="to('<%=basePath%>selectPlan.action?market.marketId=<s:property value="market.marketId"/>');" title="制定计划" src="<%=basePath%>images/bt_plan.gif" class="op_button" />
			<img onclick="to('<%=basePath%>findPlan.action?market.marketId=<s:property value="market.marketId"/>');" title="执行计划" src="<%=basePath%>images/bt_feedback.gif" class="op_button" />
			<img onclick="alert('用户开发成功，已添加新客户记录。');window.location.href='upPlanMarket.action?market.marketId=<s:property value="#session.marId"/>&parem=succ';" title="开发成功" src="<%=basePath%>images/bt_yes.gif" class="op_button" />
		</td>
		</s:if>
		<s:else>
		<td class="list_data_text">已归档</td>
		<td class="list_data_op">
		<img onclick="to('<%=basePath%>chakanPlan.action?market.marketId=<s:property value="market.marketId"/>');" title="查看" src="<%=basePath%>images/bt_detail.gif" class="op_button" />	
		</td>
		
		</s:else>
	</tr>
	</s:iterator>
	<tr>
		<th colspan="10" class="pager">
<div class="pager">
	共<s:property value='pag.allRecds'/>条记录 每页<s:property value='pag.pageSize'/>条
	第<s:property value='pag.pageNo'/>页/共<s:property value='pag.allRecds%pag.pageSize==0?pag.allRecds/pag.pageSize:pag.allRecds/pag.pageSize+1'/>页
	<a href="intiAction.action?pag.pageNo=1">第一页</a>
	<a href="intiAction.action?pag.pageNo=<s:property value='pag.pageNo-1'/>">上一页</a>
	<a href="intiAction.action?pag.pageNo=<s:property value='pag.pageNo+1'/>">下一页</a>
	<a href="intiAction.action?pag.pageNo=<s:property value='pag.allRecds%pag.pageSize==0?pag.allRecds/pag.pageSize:pag.allRecds/pag.pageSize+1'/>">最后一页</a>
	转到<input value="1" id="tiao" size="2" />页
	<button width="20" onClick="repla()">GO</button>
</div>
		</th>
	</tr>
</table>
<script>
function repla(){
var tiao=document.getElementById("tiao");
location.href="intiAction.action?pag.pageNo="+tiao.value;

}
	function selectDes(s){
	alert(document.getElementById(s).action);
	document.getElementById(s).submit();
	}
</script>
</body>
</html>